package entity;
/*
  玉米类
 */
public class Corn extends Crop{

    private double harvestCost;      //收割费用


    public Corn(){
        System.out.println("玉米类的无参构造器");
    }
    public Corn(String name,int growTime,int harvestTime,int numsOfFruits,String status ,double harvestCost, boolean isHarvested){
        super(name,growTime,harvestTime,numsOfFruits,status,isHarvested);
        this.harvestCost=harvestCost;

    }

    @Override
    public void print() {
        System.out.println("*****作物特性*****");
        System.out.println("您种植了" + this.getName() + "。");
        System.out.println("生长期" + this.getGrowTime() + "天，"
                + "采摘期" + this.getHarvestTime() + "天， "
                + "产量" + this.getNumsOfFruits() + ",现在处于" + this.getStatus() + ",是否可以采摘:" + this.isHarvested());
        System.out.println("采摘费用:"+ this.getHarvestCost());
    }

    public double getHarvestCost() {
        return harvestCost;
    }

    public void setHarvestCost(double harvestCost) {
        this.harvestCost = harvestCost;
    }


}
